import { FC } from 'react'
import { Button, Card, Col, Row } from 'antd'
import { useNewTask } from '@/hooks/dashboard'

const NewTask: FC = () => {
  const { loading, task } = useNewTask()
  const { taskCategoryName, title, description, timeMoney } = task

  return (
    <Card loading={loading} hoverable title={taskCategoryName}>
      <h3>{title}</h3>
      <p>{description}</p>
      <Row justify="space-between" align="bottom">
        <Col span={4}>
          <p className="height-100">奖励：+{timeMoney} 有赞币</p>
        </Col>
        <Col>
          <p className="height-80">
            <Button>查看教程</Button>
            <Button type="primary">领取奖励</Button>
          </p>
        </Col>
      </Row>
    </Card>
  )
}

export default NewTask
